package com.reyco1.data
{	﻿  
	﻿  public class AMFCollection extends Collection
	﻿  {
		﻿  ﻿  protected var _properties:Array = [];
		﻿  ﻿  
		﻿  ﻿  public function AMFCollection(myArrayCollection:Object)
		﻿  ﻿  {
			﻿  ﻿  ﻿  super();
			﻿  ﻿  ﻿  
			﻿  ﻿  ﻿  var values:Array = myArrayCollection.serverInfo.initialData;
			﻿  ﻿  ﻿  _properties﻿  ﻿    = myArrayCollection.serverInfo.columnNames;
			﻿  ﻿  ﻿  
			﻿  ﻿  ﻿  for(var i:int = 0; i<values.length; i++) 
			﻿  ﻿  ﻿  {
				﻿  ﻿  ﻿  ﻿  var obj:Object = new Object();
				﻿  ﻿  ﻿  ﻿  for (var aIndex:* in _properties) 
				﻿  ﻿  ﻿  ﻿  {
					﻿  ﻿  ﻿  ﻿  ﻿  obj[_properties[aIndex]] = values[i][aIndex];
				﻿  ﻿  ﻿  ﻿  }
				﻿  ﻿  ﻿  ﻿  addItem(obj);
			﻿  ﻿  ﻿  }
		﻿  ﻿  }
		﻿  ﻿  
		﻿  ﻿  public function get properties():Array
		﻿  ﻿  {
			﻿  ﻿  ﻿  return _properties;
		﻿  ﻿  }
		﻿  ﻿  
		﻿  ﻿  override public function toString():String
		﻿  ﻿  {
			﻿  ﻿  ﻿  return "[AMFCollection] :: contains " + length + " items.";
		﻿  ﻿  }
	﻿  }
}